<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CreateUpdateCompany.ascx.cs" Inherits="TVT.UI.UserControls.CreateUpdateCompany" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<asp:UpdatePanel ID="upCreateUpdateCompany" runat="server" UpdateMode="Conditional">
    <ContentTemplate>        
        <table style="text-align:left;" width="100%" cellpadding="0" cellspacing="0" >
            <tr>
                <td class="style2" style="background-image:url(App_Themes/NewDesign/Images/barra-pix.gif);">
                    <img id="imgPoints" src="App_Themes/NewDesign/Images/tild-tit.gif" style="vertical-align:middle"/>
                    <font class="titleText">Create/Update Company</font>
                </td>
                <td class="style2" align="right"  style="background-image:url(App_Themes/NewDesign/Images/barra-pix.gif);">    
                    <asp:LinkButton ID="lnkBtnCollapseCreateUpdateCompany" runat="server"><asp:Image ID="imgCollapseExpandCreateUpdateCompany" ImageUrl="~/App_Themes/NewDesign/Images/_icon.gif" runat="server" style="padding-right:10px;vertical-align:middle;" /></asp:LinkButton>
                </td>
            </tr>
        </table>        
        <asp:Panel ID="pnlCreateUpdateCompany" runat="server" Width="90%" style="text-align:left; padding-left:40px; padding-top:10px">
            <table style="text-align:left;height:50px" cellpadding="0px" cellspacing="0px" width="1010px" class="Table">   
                <tr>            
                    <td>
                        <asp:Label ID="lblTransactionResultMessage" runat="server" Visible="false" CssClass="transactionResultMessage"></asp:Label>
                        <asp:ValidationSummary ID="requiredValidator" runat="server" ValidationGroup="requiredField"  />
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Panel ID="pnlCompany" runat="server" Visible="true">
                           <table>
                                <tr>
                                    <td style="width:115px">
                                        <asp:Label ID="lblCompanyNames" runat="server" CssClass="labelText" Text="Company Name:" style="margin-left:18px"></asp:Label>   
                                    </td>
                                    <td style="width:300px">
                                        <asp:TextBox ID="txtCompanyName" runat="server" Width="100px" CssClass="TextBox"></asp:TextBox> 
                                        <asp:RequiredFieldValidator ID="rqdValidator" runat="server" ControlToValidate="txtCompanyName" Text="*" ValidationGroup="requiredField" ErrorMessage="Must enter Company Name"></asp:RequiredFieldValidator>  
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width:115px">
                                        <asp:Label ID="lblAccountMFee" runat="server" CssClass="labelText" Text="AccountManagmentFee:" style="margin-left:18px"></asp:Label>   
                                    </td>
                                    <td style="width:300px">
                                        <asp:TextBox ID="txtAccountMFee" runat="server" Width="100px" CssClass="TextBox"></asp:TextBox> 
                                        <asp:RequiredFieldValidator ID="rqdInterestValidator" runat="server" ControlToValidate="txtAccountMFee" Text="*" ValidationGroup="requiredField" ErrorMessage="Must enter an Account Managment Fee"></asp:RequiredFieldValidator>  
                                        <asp:RangeValidator ID="rvAccountInterest" MinimumValue="0" MaximumValue="1"
                                            Type="Double" ControlToValidate="txtAccountMFee" Text="*" runat="server" ValidationGroup="requiredField"
                                            ErrorMessage="Must enter a decimal number between 0 and 1 for Fee" >
                                        </asp:RangeValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width:115px">
                                        <asp:Label ID="lblPerfFee" runat="server" CssClass="labelText" Text="PerformanceFee:" style="margin-left:18px"></asp:Label>
                                    </td>
                                    <td style="width:300px">
                                        <asp:TextBox ID="txtPerfFee" runat="server" Width="100px" CssClass="TextBox"></asp:TextBox> 
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtPerfFee" Text="*" ValidationGroup="requiredField" ErrorMessage="Must enter a Performance Fee"></asp:RequiredFieldValidator>  
                                        <asp:RangeValidator ID="RangeValidator1" MinimumValue="0" MaximumValue="1"
                                            Type="Double" ControlToValidate="txtPerfFee" Text="*" runat="server" ValidationGroup="requiredField"
                                            ErrorMessage="Must enter a decimal number between 0 and 1 for Fee" >
                                        </asp:RangeValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width:115px">
                                        <asp:Label ID="lblTelephone" runat="server" CssClass="labelText" Text="Telephone:" style="margin-left:18px"></asp:Label>   
                                    </td>
                                     <td style="width:300px">
                                        <asp:TextBox ID="txtTelephone" runat="server" Width="100px" CssClass="TextBox"></asp:TextBox> 
                                     </td>
                                </tr>
                                <tr>
                                    <td style="width:115px">
                                        <asp:Label ID="lblAddress" runat="server" CssClass="labelText" Text="Address:" style="margin-left:18px"></asp:Label>   
                                    </td>
                                     <td style="width:300px">
                                        <asp:TextBox ID="txtAddress" runat="server" Width="100px" CssClass="TextBox"></asp:TextBox> 
                                     </td>
                                </tr>
                                <tr>
                                    <td style="width:115px">
                                        <asp:Label ID="lblTaxId" runat="server" CssClass="labelText" Text="TaxId:" style="margin-left:18px"></asp:Label>   
                                    </td>
                                     <td style="width:300px">
                                        <asp:TextBox ID="txtTaxId" runat="server" Width="100px" CssClass="TextBox"></asp:TextBox> 
                                     </td>
                                </tr>                                   
                            </table>
                        </asp:Panel>
                    </td>
                </tr>
            </table>
            <table width="100%" style="text-align:center">
                <tr>
                    <td >
                        <asp:Button id="btnSubmit" runat="server" style="background-image:url(App_Themes/NewDesign/Images/btn-SubmitBlue.gif);cursor:pointer" CssClass="Button" Text="SUBMIT" ValidationGroup="requiredField" OnClick="SaveCompany"/>                               
                        <asp:Button id="btnCancel" runat="server" style="background-image:url(App_Themes/NewDesign/Images/btn-SubmitBlue.gif);cursor:pointer" CssClass="Button" Text="CANCEL" OnClick="CancelCompany" />                                    
                    </td>
                </tr>
            </table>
        </asp:Panel>
        <ajaxToolkit:CollapsiblePanelExtender ID="collapsibleCreateUpdateCompany" runat="server"
            TargetControlID="pnlCreateUpdateCompany"
            CollapsedSize="0"
            Collapsed="False"
            ExpandControlID="lnkBtnCollapseCreateUpdateCompany"
            CollapseControlID="lnkBtnCollapseCreateUpdateCompany"
            AutoCollapse="False"
            AutoExpand="False"
            ImageControlID="imgCollapseExpandCreateUpdateCompany"
            ExpandedImage="~/App_Themes/NewDesign/Images/_icon.gif"
            CollapsedImage="~/App_Themes/NewDesign/Images/+icon.gif"
            ExpandDirection="Vertical" />
     </ContentTemplate>
</asp:UpdatePanel>